angular.module('homeApp', []).controller( 'homeCtr',
	function($scope, $http) {
	$http({  
		url:basePath+'/home/queryAllData',  
		method:'POST'  
		}).success(function(data,header,config,status){ 
	
			
			$scope.sj=data.staticsInfoLst[0].count;
			$scope.ht=data.staticsInfoLst[1].count;
			$scope.sk=data.staticsInfoLst[3].amout;
			$scope.sr=data.staticsInfoLst[2].amout;
			$scope.sjcount=data.aduitingModelLst[0].count;
			$scope.htcount=data.aduitingModelLst[1].count;
			$scope.ssfwhtcount=data.aduitingModelLst[2].count;
			$scope.bjdcount=data.aduitingModelLst[3].count;
			$scope.sqshcount=data.aduitingModelLst[4].count;
			$scope.cpcount=data.aduitingModelLst[5].count;
			$scope.cpdjcount=data.aduitingModelLst[6].count;
			$scope.cpsfwdjcount=data.aduitingModelLst[7].count;
			$scope.htskcount=data.aduitingModelLst[8].count;
			$scope.htkpcount=data.aduitingModelLst[9].count;
			$scope.dhdcount=data.aduitingModelLst[10].count;
	
		   if($scope.sjcount==0){
			   $('#sj').hide();
		   }
		   if($scope.htcount==0){
			   $('#ht').hide();
		   }
		  /* if($scope.ssfwhtcount==0){
			   $('#ssfwht').hide();
		   }*/
		   if($scope.bjdcount==0){
			   $('#bjd').hide();
		   }
		   /*if($scope.sqshcount==0){
			   $('#sqsh').hide();
		   }*/
		   if($scope.cpcount==0){
			   $('#cp').hide();
		   }
		   if($scope.cpdjcount==0){
			   $('#cpdj').hide();
		   }
		   if($scope.cpsfwdjcount==0){
			   $('#cpsfwdj').hide();
		   }
		   if($scope.htskcount==0){
			   $('#htsk').hide();
		   }
		   if($scope.htkpcount==0){
			   $('#htkp').hide();
		   }
		   if($scope.dhdcount==0){
			   $('#dhd').hide();
		   }
			//
		}).error(function(data,header,config,status){  
			  toastr.warning("操作失败！");  
  		});
	
	
});
